#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	return 0;
}
#include<stdio.h>
#include<math.h>
int main()
{
	int x1 = 0, x2 = 0;
	int y1 = 0, y2 = 0;
	scanf("%d %d", &x1, &y1);
	scanf("%d %d", &x2, &y2);
	int ret = (int)pow(x1 - x2, 2) + (int)pow(y1 - y2, 2);
	printf("%d", ret);
	return 0;
}